package com.wakala.employment.widget

import android.content.Context
import android.graphics.Bitmap
import android.graphics.Canvas
import android.util.AttributeSet
import androidx.constraintlayout.widget.ConstraintLayout

class MyConstraintLayout: ConstraintLayout {
    constructor(context: Context) : super(context)

    constructor(context: Context, attributeSet: AttributeSet) : super(context, attributeSet)

    constructor(context: Context, attributeSet: AttributeSet, defStyleAttr: Int) : super(context, attributeSet, defStyleAttr)

    fun getBitmap(): Bitmap {
        val bitmap = Bitmap.createBitmap(this.width, this.height,Bitmap.Config.ARGB_8888)
        this.draw(Canvas(bitmap))

        return bitmap
    }
}